clear all;close all

A = xlsread('dP_dwvsw_theory_whistler_mode.xlsx');
B = xlsread('dP_dwvsw_theory_X_mode.xlsx');

figure
h=semilogy(A(:,1),A(:,2),'k');set(h,'linewidth',2);hold on
h=semilogy(A(:,1),A(:,3),'b');set(h,'linewidth',2);
h=semilogy(A(:,1),A(:,4),'r');set(h,'linewidth',2);

set(gca,'fontsize',20)
xlabel('\omega/\omega_{ce}')
ylabel('$\frac{\omega_{pe}}{\omega_{ce}}\frac{1}{\bar{q}_b^2}\frac{d\bar{P}}{d\Omega}$','interpreter','latex')
axis([0 2.3 1e-5 1e5])
axis square
legend('E_b=2 keV','E_b=15 keV','E_b=30 keV','location','northwest');
legend boxoff
title('Point pulse')

figure
h=semilogy(B(:,1),B(:,2),'k');set(h,'linewidth',2);hold on
h=semilogy(B(:,1),B(:,3),'b');set(h,'linewidth',2);
h=semilogy(B(:,1),B(:,4),'r');set(h,'linewidth',2);

set(gca,'fontsize',20)
xlabel('\omega/\omega_{ce}')
ylabel('$\frac{\omega_{pe}}{\omega_{ce}}\frac{1}{\bar{q}_b^2}\frac{d\bar{P}}{d\Omega}$','interpreter','latex')
axis([0 2.3 1e-5 1e5])
axis square
title('Gaussian pulse')